package com.numbfish.bean_factory.ex_01_start;

public class FXNewsProvider {
    private DowJonesNewsListener newsListener;
    private DowJonesNewsPersister newsPersister;

    public FXNewsProvider() {
    }

    public FXNewsProvider(DowJonesNewsListener newsListener, DowJonesNewsPersister newsPersister) {
        this.newsListener = newsListener;
        this.newsPersister = newsPersister;
    }

    public DowJonesNewsListener getNewsListener() {
        return newsListener;
    }

    public void setNewsListener(DowJonesNewsListener newsListener) {
        this.newsListener = newsListener;
    }

    public DowJonesNewsPersister getNewsPersister() {
        return newsPersister;
    }

    public void setNewsPersister(DowJonesNewsPersister newsPersister) {
        this.newsPersister = newsPersister;
    }

    public void getAndPersistNews() {
        System.out.println("called getAndPersistNews");
    }
}
